Skip to content
  • 0 Votes
    2 Posts
    148 Views
    zaasmiZ

    Please share idea

  • 0 Votes
    2 Posts
    265 Views
    zaasmiZ

    @zaasmi said in CS312 Assignment 2 Solution and Discussion:

    In continuation of assignment 1 of CS312, by using system requirements, we identified following entities in the system under observation;

    Admin / Owner
    Tour Plan
    Sites
    Activity
    Visitor
    Guide

    By considering these entities in your system, you must identify entity attributes and cardinality between provided entities. Note that you are not required to add any extra entity from your side that would result in deduction of marks. So, your Task is to;
    TASK: [Marks = 10 + 10 = 20]
    Draw ER diagram containing entities, assumed attributes and cardinalities between these entities.

    3cbd2d00-8d98-4fc8-9190-93dd10b22944-image.png

  • 0 Votes
    1 Posts
    321 Views
    No one has replied
  • 0 Votes
    3 Posts
    147 Views
    zaasmiZ
    #include<iostream> using namespace std; class Question { private : int QuestionID; string QuestionType; int QuestionMarks; public : Question() { cout<<"Enter Question ID : "; cin>>QuestionID; cout<<"Enter Question Type : "; cin>>QuestionType; cout<<"Enter Question Marks : "; cin>>QuestionMarks; } void setQueID(int id) { QuestionID=id; } void setQueType(string type) { QuestionType=type; } void setQueMarks(int marks) { QuestionMarks=marks; } int getQueID() const { return QuestionID; } string getQueType() const { return QuestionType; } int getQueMarks() const { return QuestionMarks; } }; class Exam { private : string ExamType; string CourseCode; static const int NoOfQuestions=2; Question *questions[NoOfQuestions]; public : Exam(string EType, string CCode) { ExamType=EType; CourseCode=CCode; for(int i=0; i<NoOfQuestions; i++) { cout<<"\n***** Enter Data of Question No. "<<i+1<<" *****\n"; questions[i] = new Question(); } } void DisplayInfo() { cout<<"----------------------------\n"; cout<<"**** Displaying Exam Information ****"; cout<<"\n----------------------------"; cout<<"\nExam Type : "<<ExamType; cout<<"\nCourse Code : "<<CourseCode; cout<<"\nTotal No of Questions for Exam : "<<NoOfQuestions; cout<<"\n----------------------------\n"; cout<<"**** Displaying Question Information ****"; cout<<"\n----------------------------"; for(int i=0; i<NoOfQuestions; i++) { cout<<"\nQuestion No. : "<<i+1; cout<<"\nQuestion Id : "<<questions[i]->getQueID(); cout<<"\nQuestion Type : "<<questions[i]->getQueType(); cout<<"\nQuestion Marks : "<<questions[i]->getQueMarks(); cout<<"\n----------------------------"; } } }; main() { cout<<"\n\t\tCS304 Assignment No. 2 Solution \n"; cout<<"\nPlease Subscribe Cyberian Youtube Channel to get Solutions of all Programming Assignments\n\n"; string type, code; cout<<"Enter Exam Type : "; getline(cin, type); cout<<"Enter Course Code : "; getline(cin, code); Exam exm1(type,code); exm1.DisplayInfo(); }
  • 0 Votes
    5 Posts
    261 Views
    zaasmiZ

    @zaasmi said in CS204 Assignment 2 Solution and Discussion:

    Suppose that if you’ve ever tried to login to your online bank account and find that not all of your savings are being accounted for, it could be an indication that you’ve been targeted by cyber criminal. Although there are several ways that cyber criminals could have gotten your account data, there’s a fair chance you’ve accidentally come across a phishing website in the past, misinterpreting the login page of your online bank. Enlist all possible security measures to protect your online banking account from cyber criminals.

    Respond as if the network has already been breached. Adopting this mindset forces the IT team to prioritize the most business-critical parts of the network and use network segmentation as a strategy. When done correctly, network segmentation, achieved through the creation of network zones, limits the ability for a hacker to move laterally across a compromised network. Network segmentation requires continual updates and configurations, but it can mean the difference between a hacker getting only as far as an employee’s infected computer and helping themselves to the bank’s ATM systems. Implement an enterprise-wide security policy. A well-defined security policy serves as a crucial road map for any bank IT team to maintain a truly adaptive security architecture. It’s what helps the people tasked with protecting the bank’s systems determine the best way for the network to operate with minimal risk. Additionally, the security policy should take into consideration all regulatory and enterprise compliance requirements and how to apply timely patches to maintain compliance. Security policy enforcement. It’s one thing to have a security policy that defines how the IT platform behaves and another to actually validate that it is being enforced across your network. Doing the former but not the latter might allow you to comply with some regulations, but it won’t make your network safer. Organizations must constantly monitor their network for changes to configurations and ensure that these changes are approved and compliant with policy. It’s a collaborative effort across the enterprise—network operations, security operations, and the CIO.
  • 0 Votes
    3 Posts
    278 Views
    zaasmiZ

    @zaasmi said in CS201 Assignment 2 Solution and Discussion:

    code please?

    #include<iostream> using namespace std; // Declaration of function showElements void showElements(long s[][4]); // Declaration of function PercentageDeath void PercentageDeath(long s[][4], int i); // Declaration of function PercentageRecovered void PercentageRecovered(long s[][4], int i); main() { cout<<"\n\nCS201 Assignment No. 2 Solution \n\n"; long source_data[7][4]= {0,560433, 22115, 32634, 1,156363, 19899, 34211, 2,84279, 10612, 0, 3,82160, 3341, 77663, 4,71686, 4474, 43894, 5,56956, 1198, 3446, 6,5374, 93, 109}; showElements(source_data); int user_choice; do { cout<<"\nPress the country code to calculate percentage of dead and recovered persons\n"; cout<<"\n*** Press 0 for Pakistan ***"; cout<<"\n*** Press 1 for China ***"; cout<<"\n*** Press 2 for Italy ***"; cout<<"\n*** Press 3 for UK ***"; cout<<"\n*** Press 4 for Iran ***"; cout<<"\n*** Press5 for France ***"; cout<<"\n*** Press 6 for Turkey ***"; cout<<"\n*** Press 7 to Exit ***"; cout<<"\n\nPlease select an option use number from 0 to 7 : "; input: cin>>user_choice; if(user_choice>=0 && user_choice<=6) { PercentageDeath(source_data, user_choice); PercentageRecovered(source_data, user_choice); } else if(user_choice<0 || user_choice>7) { cout<<"\n\nChoice should be between 0 to 7 "; cout<<"\ninvalid choice ! please select again : "; goto input; } }while(user_choice!=7); } // definition of function showElements void showElements(long s[][4]) { cout<<"Source Data : \n\n"; cout<<"Country\tCases\tDeaths\tRecovered\n\n"; for(int i=0; i<7; i++) { for(int j=0; j<4; j++) { cout<<s[i][j]<<"\t"; } cout<<"\n"; } } // definition of function PercentageDeath void PercentageDeath(long s[][4], int i) { float d_rate=(float)100*s[i][2]/s[i][1]; cout<<"\nPercentage of death is "<<d_rate; } // definition of function PercentageRecovered void PercentageRecovered(long s[][4], int i) { float r_rate=(float)100*s[i][3]/s[i][1]; cout<<"\n\nPercentage of recocered is "<<r_rate<<"\n"; }
  • 0 Votes
    2 Posts
    151 Views
    zaasmiZ

    @cyberian said in CS420 Assignment 2 Solution and Discussion:

    You are required to develop an HTML5 based webpage which draws an Animated Solar System (i.e. moon revolves around earth and earth revolves around the sun) on canvas.
    Here is a screenshot of a sample page.

    Your Task is to make such a page suitable for portable devices. You can use concepts of HTML5, CSS and JavaScript etc.

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CS420 - Assignment # 2</title> </head> <body> <canvas id="canvas" width="1000" height="1000"></canvas> <script> var sun = new Image(); var moon = new Image(); var earth = new Image(); function init() { sun.src = 'images/canvas_sun.png'; moon.src = 'images/canvas_moon.png'; earth.src = 'images/canvas_earth.png'; window.requestAnimationFrame(draw); } function draw() { var ctx = document.getElementById('canvas').getContext('2d'); ctx.globalCompositeOperation = 'destination-over'; ctx.clearRect(0, 0, 800, 800); // clear canvas ctx.fillStyle = 'rgba(0, 0, 0, 0.4)'; ctx.strokeStyle = 'rgba(0, 153, 255, 0.4)'; ctx.save(); ctx.translate(400, 400); // Earth var time = new Date(); ctx.rotate(((2 * Math.PI) / 60) * time.getSeconds() + ((2 * Math.PI) / 60000) * time.getMilliseconds()); ctx.translate(205, 0); ctx.fillRect(0, -12, 40, 24); // Shadow ctx.drawImage(earth, -12, -12); // Moon ctx.save(); ctx.rotate(((2 * Math.PI) / 6) * time.getSeconds() + ((2 * Math.PI) / 6000) * time.getMilliseconds()); ctx.translate(0, 28.5); ctx.drawImage(moon, -3.5, -3.5); ctx.restore(); ctx.restore(); ctx.beginPath(); ctx.arc(400, 400, 205, 0, Math.PI * 2, false); // Earth orbit ctx.stroke(); ctx.drawImage(sun, 0, 0, 800, 800); window.requestAnimationFrame(draw); } init(); </script> </body> </html>

    images folder
    c513141f-d0e8-47e0-b866-045535ab5ee1-image.png

    183cd962-9200-45ca-8868-cc3297b420b2-image.png
    images:
    canvas_sun.png canvas_moon.png canvas_earth.png

  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    2 Posts
    117 Views
    zaasmiZ

    please share idea

  • 0 Votes
    2 Posts
    191 Views
    zareenZ
    #include<iostream> using namespace std; class TNode{ private: node* root; public: TNode(); int isEmpty(); void buildTree(int item); void insert(int item,node *,node *); void minNode(node*); void maxNode(node*); int countNodes(node*); int treeHeight(node*); void displayBinTree(); }; TNode::TNode(){ root = NULL; } int TNode::isEmpty() { return (root == NULL); } void TNode::buildTree(int item){ node *p = new node; node *parent; cout <<"Insert node in BST :" << item <<endl; insert(item,p,parent); } void TNode::insert(int item,node * p,node * parent){ p->data=item; p->left=NULL; p->right=NULL; parent=NULL; if(isEmpty()){ root = p; } else{ node *ptr; ptr = root; while(ptr != NULL){ parent = ptr; if(item > ptr->data){ ptr = ptr->right; } else{ ptr = ptr->left; } } if(item < parent->data){ parent->left = p; } else{ parent->right = p; } } } void TNode::minNode(node* p){ while (p->left != NULL){ p = p->left; } cout << "Minimum value : " << p->data <<endl; } void TNode::maxNode(node* p){ while (p->right != NULL){ p = p->right; } cout << "Maximum value : " << p->data <<endl; } int TNode::countNodes(node* p){ int node = 1; //Node itself should be counted if (p == NULL){ return 0; } else{ node += countNodes(p->left); node += countNodes(p->right); return node; } } int TNode::treeHeight(node* p){ if (p == NULL) { return 0; } else { int left_side = treeHeight(p->left); int right_side = treeHeight(p->right); if (left_side > right_side) { return(left_side + 1); } else { return(right_side + 1); } } } void TNode::displayBinTree(){ cout <<endl<<endl; minNode(root); maxNode(root); cout <<"Height of BST : "<<treeHeight(root); cout <<"\nTotal nodes : "<<countNodes(root); } int main(){ TNode b; int data[] = {7,2,9,1,5,14}; cout <<"Constructing Binary Search Tree by Inserting Nodes One by One "<<endl; cout <<"------------------------------------------------------------- "<<endl; int arrSize = sizeof(data)/sizeof(data[0]); for(int i = 0; i < arrSize; i++) { b.buildTree(data[i]); } }
  • 0 Votes
    1 Posts
    424 Views
    No one has replied
  • 0 Votes
    5 Posts
    340 Views
    cyberianC

    @Saif-Ali-Qureshi said in CS205 Assignment 2 Solution and Discussion:

    please share assignment file. CS205 today is last due date.

    Plz follow the steps and get results on your pc.

  • 0 Votes
    1 Posts
    78 Views
    No one has replied
  • 0 Votes
    5 Posts
    395 Views
    zaasmiZ

    @Azhar-Shokat said in CS 611 Assignment 2 Solution and Discussion:

    Question-I Marks: 05
    Online food ordering system is a web-based application. By using this application the registered user can access the account with valid credentials. User can choose the food items according to categories, place order and online payment options are available to user. User can track their orders with the food details. Keep this scenario in your mind and answer the following questions.

    Identify functional requirements of user, instead of registration and login from given scenario.

    3920fd33-e1cf-47e0-8389-a272eb692035-image.png

  • 0 Votes
    3 Posts
    475 Views
    cyberianC

  • 0 Votes
    1 Posts
    323 Views
    No one has replied